package com.linxz.wandnroid.adapter;

import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.linxz.ui.GuiHelper;
import com.linxz.wandnroid.R;
import com.linxz.wandnroid.pojo.WandroidProjectBean;
import java.util.List;

/**
 * @author Linxz
 * 创建日期：2020年02月29日 11:29
 * version：v4.5.4
 * 描述：
 */
public class ProjectAdapter extends BaseQuickAdapter<WandroidProjectBean, BaseViewHolder> {

    public ProjectAdapter(List<WandroidProjectBean> data) {
        super(R.layout.wandroid_item_project,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, WandroidProjectBean item) {
          helper.setText(R.id.tvName, item.getAuthor())
                .setText(R.id.tvTime, item.getNiceShareDate())
                .setText(R.id.tvTittle, item.getTitle())
                .setText(R.id.tvDesc, item.getDesc());

        ImageView ivAvatar=helper.getView(R.id.ivAvatar);
        ImageView iv=helper.getView(R.id.iv);
        GuiHelper.loadImage(mContext,item.getEnvelopePic(),ivAvatar);
        GuiHelper.loadImage(mContext,item.getEnvelopePic(),iv);
    }
}
